<template>
	<div>
		<el-card class="box-card">
			<div class="text item">
				<div class="hoverdivClass" v-for="(value, key) in propertyList" :key="key">
					<el-form ref="form" v-if="titleList[key]" label-position="left">
						<el-form-item :label="titleList[key]">
							<el-input v-model="propertyList[key]" type="textarea"></el-input>
						</el-form-item>
					</el-form>
				</div>
			</div>
		</el-card>
	</div>
</template>
<script>
export default {
	props: {
		getData: {
			type: Function,
			default: Function
		}
	},
	data() {
		return {
			titleList: {
				bondMaxRatio: '债券类资产投资最高比例',
				bondMinRatio: '债券类资产投资最低比例',

				currencyMaxRatio: '货币类资产投资最高比例',

				currencyMinRatio: '货币类资产投资最低比例',

				hkStockMaxRatio: '香港市场股票类资产投资最高比例',

				isContainSpclLimit: '是否包括特殊投资限制',

				isCoverTactics: '是否采用对冲策略',

				isQuantTactics: '是否采用量化策略',

				remark: '投资相关-备注',

				spclLimitRemark: '特殊投资限制备注',

				specialTypeChar: '是否特殊品种',

				specialTypeName: '其他-特殊品种名',

				stockMaxRatio: '股票类资产投资最高比例',

				stockMinRatio: '股票类资产投资最低比例'
			},
			propertyList: {
				bondMaxRatio: '',

				bondMinRatio: '',

				currencyMaxRatio: '',

				currencyMinRatio: '',

				hkStockMaxRatio: '',

				isContainSpclLimit: '',

				isCoverTactics: '',

				isQuantTactics: '',

				remark: '',

				spclLimitRemark: '',

				specialTypeChar: '',

				specialTypeName: '',

				stockMaxRatio: '',

				stockMinRatio: ''
			}
		}
	},
	methods: {
		saveSetings() {
			return this.propertyList
		},
		edit(data) {
			const obj = JSON.parse(JSON.stringify(data))
			this.propertyList = { ...this.propertyList, ...obj }
			for (const i in this.propertyList) {
				if (!this.propertyList[i]) {
					this.propertyList[i] = ''
				}
			}
		}
	}
}
</script>
<style lang="scss" scoped >
</style>
